<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <form action="">
    <input type="text" name="account">
    <input type="password" name="password">
    <input type="checkbox" checked name="hobbies">
    <select name="fruits">
      <option value="apple">苹果</option>
      <option value="orange">橘子</option>
    </select>
  </form>
  <script>
    var formEl = document.body.firstElementChild
    var formEl = document.forms[0]

    var inputEl = formEl.elements.account
    console.log(inputEl)
    setTimeout(function () {
      console.log(inputEl.value)
    }, 5000)

  </script>
</body>

</html>